package injectTest

import akka.actor.ActorSystem
import com.google.inject.AbstractModule
//import com.kongming.utils.ioc.provider.{MongoSession, MongoSessionProvider}
import org.mongodb.morphia.Morphia

/**
  * Created by liuwei on 2017/10/30.
  */
class AnimalModule extends AbstractModule{
  override def configure() = {

    bind(classOf[Morphia]).toInstance(new Morphia)
//    bind(classOf[MongoSession]).toProvider(classOf[MongoSessionProvider])


    bind(classOf[Animal]).to(classOf[Cat])

    implicit val formats = org.json4s.DefaultFormats

    implicit val system = ActorSystem()
  }
}
